<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     */
    public function up(): void
    {
        Schema::create('table_types', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->unsignedInteger('start_num')->default(1)->comment('开始编号');
            $table->unsignedInteger('count')->default('0')->comment('数量');
            $table->unsignedInteger('default_people_count')->default(2)->comment('默认每桌人数');
            $table->string('type')->comment('散台|包厢');
            $table->bigInteger('default_rule_id')->nullable()->comment('默认计费模式');
            $table->bigInteger('store_id');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('table_types');
    }
};
